package com.cheng.im.service.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cheng.im.service.common.resp.CommonResult;
import com.cheng.im.service.user.domain.ImUserData;
import com.cheng.im.service.user.model.req.*;
import com.cheng.im.service.user.model.resp.GetUserInfoResp;
import com.cheng.im.service.user.model.resp.ImportUserResp;
import com.cheng.im.service.user.model.resp.UserLoginResp;

import java.util.Map;

/**
* @author Cheng
* @description 针对表【im_user_data(im模块的im用户表)】的数据库操作Service
* @createDate 2024-12-17 08:59:23
 * todo: 测试去掉继承后能不能行
*/
public interface ImUserDataService {

    /**
     * 批量导入im用户数据
     * @param req
     * @return
     */
    public CommonResult<ImportUserResp> importUser(ImportUserReq req);

    /**
     * 批量查询im用户的基本信息
     * @param req
     * @return
     */
    public CommonResult<GetUserInfoResp> getUserInfo(GetUserInfoReq req);

    /**
     * 查询im用户的基本信息
     * @param userId im用户的id
     * @param appId
     * @return
     */
    public CommonResult<ImUserData> getSingleUserInfo(String userId , String appId);

    /**
     * 批量删除用户
     * @param req
     * @return
     */
    public CommonResult<ImportUserResp> deleteUser(DeleteUserReq req);

    /**
     * 修改用户信息
     * @param req
     * @return
     */
    public CommonResult modifyUserInfo(ModifyUserInfoReq req);

    /**
     * im用户登录，返回一个可连接的im节点
     * @param req
     * @return
     */
    public CommonResult login(LoginReq req);


    CommonResult<Map<Object, Object>> getUserSequence(GetUserSequenceReq req);

    CommonResult<UserLoginResp> userLogin(UserLoginReq userLoginReq);

    CommonResult checkToken(String token);
}
